/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package memory;

import java.util.Date;

/**
 *
 * @author Erdiansyah
 */
public class Chat {
    public String sender;
    public String message;
    public Date time;

    public Chat(String send, String msg) {
        sender = send;
        message = msg;
        time = new Date();
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public String printChat(){
        return getSender()+ " : "+ getMessage();
    }
}
